package cn.iocoder.yudao.module.erp.dal.dataobject.product;

import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * ERP 产品 DO
 *
 * @author 芋道源码
 */
@TableName("erp_product_price")
@KeySequence("erp_product_price_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ErpProductPriceDO extends BaseDO {
    /**
     * 产品编号
     */
    @TableId
    @Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1234567890123")
    private Long id;
    /**
     * 产品id
     */
    @Schema(description = "产品id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1234567890123")
    private Long productId;
    /**
     * 采购价格，单位：元
     */
    @Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "2025-05-26")
    private BigDecimal price;

    @Schema(description = "有效期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2025-05-26")
    @ExcelProperty("有效期开始时间")
    private LocalDateTime startTime;

    @Schema(description = "有效期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2025-05-26")
    @ExcelProperty("有效期结束时间")
    private LocalDateTime endTime;

}
